<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="UTF-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>已提交现场</title> 
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.3/themes/bootstrap/easyui.css">
    <link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.3/themes/icon.css">
     <link rel="stylesheet" type="text/css" href="easyui-me/columns.css">
    <script type="text/javascript" src="jquery-easyui-1.5.3/jquery.min.js"></script>
    <script type="text/javascript" src="jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="js/dateFormatter.js"></script>
    <script type="text/javascript" src="jquery-easyui-1.5.3/locale/easyui-lang-zh_CN.js"></script>

   <!-- <link href="jquery-easyui-1.5.3/themes/icon.css" rel="stylesheet"> 
     <link href="css/base.css" rel="stylesheet">
    <link href="css/basic_info.css" rel="stylesheet">
    <link rel="stylesheet" href="css/xk.css">
    <link href="css/process.css" rel="stylesheet">-->
</head> 
<body>
  <div class="panel">
    <div class="panel-header">
      <form action="" name="QueryForm">
      <table width="98%" border="0" cellspacing="5" cellpadding="0" align="center">
        <tr height="24px;">
          <td width="10%" height="24px;" align="right">勘验号:</td>
          <td width="23%" align="left">
            <input type="text" name="logUser" id="f_logUser" class="easyui-textbox"  style="width:70%;" />
          </td>
          <td width="10%" height="24px;" align="right">案件编号:</td>
          <td width="23%" align="left">
            <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
          <td width="10%" height="24px;" align="right">勘验时间:</td>
          <td width="24%" align="left">
            <input class="easyui-datebox" name="beginDate" id="f_beginDate" style="width:30%" />
            至 <input class="easyui-datebox" name="endDate" id="f_endDate"  style="width:30%"/>
          </td>
        </tr>
        <tr height="24px;">
          <td width="10%" height="24px;" align="right">案件类别:</td>
          <td width="23%" align="left">
            <input type="text" name="logUser" id="f_logUser" class="easyui-textbox"  style="width:70%;" />
          </td>
          <td width="10%" height="24px;" align="right">发案区划:</td>
          <td width="23%" align="left">
            <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
          <td width="10%" height="24px;" align="right">勘验地点:</td>
          <td width="24%" align="left">
           <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
        </tr>
        <tr height="24px;">
          <td width="10%" height="24px;" align="right">是否破案:</td>
          <td width="23%" align="left">

            <select class="easyui-combobox" id="f_type" name="type"  style="width:70%;" data-options="valueField:'id', textField:'text'" >
                  <option value=""></option>
                  <option value="材料">是</option>
                  <option value="配件">否</option>
               </select>
          </td>
          <td width="10%" height="24px;" align="right">是否刑案:</td>
          <td width="23%" align="left">
            <select class="easyui-combobox" id="f_type" name="type"  style="width:70%;" data-options="valueField:'id', textField:'text'" >
                  <option value=""></option>
                  <option value="材料">是</option>
                  <option value="配件">否</option>
               </select>
          </td>
          <td width="10%" height="24px;" align="right">制作笔录:</td>
          <td width="24%" align="left">
          <select class="easyui-combobox" id="f_type" name="type"  style="width:70%;" data-options="valueField:'id', textField:'text'" >
                  <option value=""></option>
                  <option value="材料">是</option>
                  <option value="配件">否</option>
               </select>
          </td>
        </tr>
        <tr  class="moreCondition" >
          <td width="10%" height="24px;" align="right">已采基站信息:</td>
          <td width="23%" align="left">
            <select class="easyui-combobox" id="f_type" name="type"  style="width:70%;" data-options="valueField:'id', textField:'text'" >
                  <option value=""></option>
                  <option value="材料">是</option>
                  <option value="配件">否</option>
               </select>
          </td>
          <td width="10%" height="24px;" align="right">案件编号为空:</td>
          <td width="23%" align="left">
            <select class="easyui-combobox" id="f_type" name="type"  style="width:70%;" data-options="valueField:'id', textField:'text'" >
                  <option value=""></option>
                  <option value="材料">是</option>
                  <option value="配件">否</option>
               </select>
          </td>
          <td width="10%" height="24px;" align="right">案件受理号为空:</td>
          <td width="24%" align="left">
           <select class="easyui-combobox" id="f_type" name="type"  style="width:70%;" data-options="valueField:'id', textField:'text'" >
                  <option value=""></option>
                  <option value="材料">是</option>
                  <option value="配件">否</option>
               </select>
          </td>
        </tr>
         <tr class="moreCondition" >
          <td width="10%" height="24px;" align="right">现场勘验人:</td>
          <td width="23%" align="left">
            <input type="text" name="logUser" id="f_logUser" class="easyui-textbox"  style="width:70%;" />
          </td>
          <td width="10%" height="24px;" align="right">现场指挥人:</td>
          <td width="23%" align="left">
            <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
          <td width="10%" height="24px;" align="right">录入人:</td>
          <td width="24%" align="left">
           <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
        </tr>
         <tr  class="moreCondition" >
          <td width="10%" height="24px;" align="right">案事件受理号:</td>
          <td width="23%" align="left">
            <input type="text" name="logUser" id="f_logUser" class="easyui-textbox"  style="width:70%;"/>
          </td>
          <td width="10%" height="24px;" align="right">被害人/报案人:</td>
          <td width="23%" align="left">
            <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
          <td width="10%" height="24px;" align="right">损失物品名称:</td>
          <td width="24%" align="left">
           <input type="text" name="logContent" id="f_logContent" class="easyui-textbox"  style="width:70%;"/>
          </td>
        </tr>
        
        <tr>
          <td colspan="6" align="right">
            <input type="button" value="查询" class="button_blue" onclick="queryFun()" />
            <input type="button" value="重置" class="button_green" onclick="resetQuery()"/>
            <input type="button" value="展开条件" class="button_blue" id="moreConditionBtn"/>
          </td>
        </tr>
      </table>
    </form>
    </div>
     <hr> 
 
    <div class="easyui-panel" id="query-data" style="padding:1px;width: 100%;">
      <table id="dataGrid" ></table>
    </div>
  
    
     
  
  <script type="text/javascript">
    var url;
    $(function () {
      var datagrid; //定义全局变量datagrid
      var editRow = undefined; //定义全局变量：当前编辑的行
      datagrid = $("#dataGrid").datagrid({
      title : "已提交现场列表",
      nowrap : false,
      border : false,
      locale : "zh_CN",
      height : $(window).height()-250,
      width:'100%',
      iconCls : 'icon-save',
      striped : true,
      collapsible : true,
      //url : "${ctx}/sysLog/querySysLogList",
      data:[{'investigationNo':'K5000000000002019030019','caseNo':'A5000000000002019030019','caseType':'入室盗窃','investigationDateFrom':'2019-04-20','investigationPlace':'长沙市岳麓区','sceneRegionalism':'长沙市岳麓区','sceneDetail':'长沙市岳麓区西中心','investigators':'张三'},
      {'investigationNo':'K5000000000002019030020','caseNo':'A5000000000002019030020','caseType':'拦路抢劫','investigationDateFrom':'2019-04-21','investigationPlace':'长沙市岳麓区','sceneRegionalism':'长沙市岳麓区','sceneDetail':'长沙市岳麓区西中心','investigators':'李四'},
      {'investigationNo':'K5000000000002019030021','caseNo':'A5000000000002019030021','caseType':'扒窃','investigationDateFrom':'2019-04-22','investigationPlace':'长沙市岳麓区','sceneRegionalism':'长沙市岳麓区','sceneDetail':'长沙市岳麓区西中心','investigators':'王五'},
      {'investigationNo':'K5000000000002019030022','caseNo':'A5000000000002019030022','caseType':'寻衅滋事','investigationDateFrom':'2019-04-23','investigationPlace':'长沙市岳麓区','sceneRegionalism':'长沙市岳麓区','sceneDetail':'长沙市岳麓区西中心','investigators':'赵六'}],
      pagination : true,//表示在datagrid设置分页              
      rownumbers : true,
      //singleSelect : true,
      //
      //        警综关联 
      columns : [ [ 
      { field : 'investigationNo',
        title : '现场勘验号',
        width : '12%',
        align : 'center' 
      }, {
        field : 'caseNo',
        title : '案件编号',
        width : '12%',
        align : 'center'
      }, {
        field : 'caseType',
        title : '案件类别',
        width : '10%',
        align : 'center'
      }, {
        field : 'investigationDateFrom',
        title : '勘验时间',
        width : '10%',
        align : 'center'
      },{
        field : 'investigationPlace',
        title : '勘验地点',
        width : '15%',
        align : 'center'
      } , {
        field : 'sceneRegionalism',
        title : '发案区划',
        width : '12%',
        align : 'center'
      }, {
        field : 'sceneDetail',
        title : '发案地点',
        width : '12%',
        align : 'center'
      }, {
        field : 'investigators',
        title : '勘验人',
        width : '10%',
        align : 'center'
      }, {
        field : 'oper',
        title : '操作',
        width : '8%',
        align : 'center'
      }] ],
          toolbar:[          //工具条  
                {text:"增加",iconCls:"icon-add",handler:function(){//回调函数  
                   location.href="step";
                }},  
                {text:"删除",iconCls:"icon-remove",handler:function(){  
                    var rows=datagrid.datagrid('getSelections');  
                          var ids = [];
                        for (var i = 0; i < rows.length; i++) {
                        ids.push(rows[i].id);
                        }
                        if(rows.length<=0){  
                            $.messager.alert('提示','请选择要删除的行','error');  
                        } else{  
                          var idArray =  new Array();
                          for (var i = 0; i < rows.length; i++) {
                            idArray.push(rows[i].id);
                          }
                        var ids= idArray.join(",");//转成字符串
                        $.messager.confirm('提示','下级节点将一起删除，您确定要删除吗',function(t){  
                            if(t){  
                                $.ajax({  
                                  type : "post", 
                                    url : "${ctx}/sysDict/deleteSysDict",  
                                    data : {"ids":ids},  
                                    dataType : "json",  
                                    success : function(r) {  
                                        if (r.success) {  
                                            datagrid.datagrid('acceptChanges');  
                                            $.messager.show({  
                                                msg : r.msg,  
                                                title : "成功"  
                                            });  
                                            editRow = undefined;  
                                            datagrid.datagrid('reload');  
                                        } else {  
                                            datagrid.datagrid('beginEdit', editRow);  
                                            $.messager.alert("错误", r.msg, 'error');  
                                        }  
                                        datagrid.datagrid('unselectAll');  
                                    }  
                                });  
                              
                            }  
                        }); 
                    }  
                }},  
                {text:"修改",iconCls:"icon-edit",handler:function(){  
                    var rows=datagrid.datagrid('getSelections');
                    if(rows.length<=0){  
                        $.messager.alert('提示','请选择要修改的行','error');  
                    }else if(rows.length>1){  
                        $.messager.alert('提示','只能选择一条数据进行修改','error');  
                    }else if(rows.length==1){  
                    $("#dlg").dialog("open").dialog('setTitle', '根字典信息修改');
                    $("#dictForm").form("load", rows[0]);
                    url = "${ctx}/sysDict/editSysDict";
                    }  
                }}
                ], 
                //height : $("#query-data").height() - 5,
    });

    //分页处理
    $("#dataGrid").datagrid("getPager").pagination({
      pageSize : 10,
      pageNumber : 1,
      pageList : [ 10, 20, 30, 40, 50 ],
      beforePageText : '第',//页数文本框前显示的汉字   
      afterPageText : '页    共 {pages} 页',
      displayMsg : '当前显示 {from} - {to} 条记录  共 {total} 条记录',
    });


    $(".moreCondition").css("display","none");
    
  });

    //查询条件  
    function queryFun() {
      var queryParameter = $('#dataGrid').datagrid("options").queryParams;
      queryParameter.logUser = $("#f_logUser").val();
      queryParameter.logContent = $("#f_logContent").val();
      queryParameter.beginDate = $("#f_beginDate").datebox("getValue");
      queryParameter.endDate = $("#f_endDate").datebox("getValue");
      $("#dataGrid").datagrid("reload");
    }

function test(){

        $.ajax({
    type:'POST',
    url:url,
    data:"obj",
    dataType:'json',
    beforeSend: function () {
    　　$.messager.progress({ 
       　　title: '提示', 
       　　msg: '文件上传中，请稍候……', 
       　　text: '' 
    　　});
    },
    complete: function () {
         $.messager.progress('close');
    },
    success:function(data){
    $("#uploadHtmlUrl").val(data.fileUrl);
         $("#uploadHtml").attr("src", data.fileUrl);
    }
 });
  
}


    $("#moreConditionBtn").click(function() {
      if ($(this).val() == "收起查询") {
        $(".moreCondition").hide();
        $("#morecondition").val(0);
        $(this).val("展开查询");
      } else {
        $(".moreCondition").show();
        $("#morecondition").val(1);
        $(this).val("收起查询");
      }
    });
  </script>
</body>